static void
gtk_open_with_dialog_response (GtkDialog *dialog,
- gint response_id)
+ gint response_id,
+ gpointer user_data)
{
GAppInfo *application;
GtkOpenWithDialog *self = GTK_OPEN_WITH_DIALOG (dialog);
}
}
+ /* don't forward this signal to other clients in this case */
+ g_signal_stop_emission_by_name (self, "response");
+
break;
default :
break;
gtk_open_with_dialog_class_init (GtkOpenWithDialogClass *klass)
{
GObjectClass *gobject_class;
- GtkDialogClass *dialog_class;
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = gtk_open_with_dialog_finalize;
gobject_class->get_property = gtk_open_with_dialog_get_property;
gobject_class->constructed = gtk_open_with_dialog_constructed;
- dialog_class = GTK_DIALOG_CLASS (klass);
- dialog_class->response = gtk_open_with_dialog_response;
-
properties[PROP_GFILE] =
g_param_spec_object ("gfile",
P_("A GFile object"),
gtk_dialog_set_default_response (GTK_DIALOG (self),
GTK_RESPONSE_OK);
+
+ /* we can't override the class signal handler here, as it's a RUN_LAST;
+ * we want our signal handler instead to be executed before any user code.
+ */
+ g_signal_connect (self, "response",
+ G_CALLBACK (gtk_open_with_dialog_response), NULL);
}
static void